/**
 * Created by zzc on 2017/11/23
 */


'use strict'

import React, {Component} from 'react';

import {
    View,
    Text,
    TextInput,
    StyleSheet
} from 'react-native';

import CollapsibleText from "../../../base/widget/CollapsibleText";

export default class HouseDetailDesc extends Component {

    constructor(props) {
        super(props)
        this.state = {
            response: "",
        }
    }

    componentWillReceiveProps = (nextProps) => {
        this.setState({
            response: nextProps.item
        });
    }

    render() {
        const info = this.state.response;
        return (
            <View style={styles.contain}>

                <Text style={{color:"black",fontSize:13}}>房屋描述</Text>
                <View style={{backgroundColor: "#F7F8FA", marginTop: 5, height: 1}}></View>

                <CollapsibleText numberOfLines = {3} expandTextStyle={styles.expandTextStyle} style={{marginTop:5,color:"black"}}>

                    <Text sytle={{fontSize:14,color:"#8F8E94"}}>房屋描述{"\n"}</Text>

                    <Text sytle={{fontSize:14,color:"black"}}>{info.doorModelDescribing}{"\n"}</Text>

                    <Text sytle={{fontSize:14,color:"#8F8E94"}}>{"\n"}小区/周边{"\n"}</Text>

                    <Text sytle={{fontSize:14,color:"black"}}>{info.positionDescription}{"\n"}</Text>

                    <Text sytle={{fontSize:14,color:"#8F8E94"}}>{"\n"}管家说{"\n"}</Text>

                    <Text sytle={{fontSize:14,color:"black"}}>{info.agentDescription}{"\n"}</Text>
                </CollapsibleText>

            </View>
        );
    }
}

const styles = StyleSheet.create({
    contain: {
        backgroundColor: 'white',
        flexDirection: "column",
        paddingTop: 10,
        paddingLeft: 10,
        paddingBottom: 10,
        marginTop:10
    },
    childContent:{
        flexDirection: "row",
        flex:1,
        justifyContent:"flex-start",
        marginTop:10
    },
    content:{
        fontSize:14,
    },
    expandTextStyle:{
        fontSize:14,
        padding:5,
        color:'#FF3366',
    }
});